#include <stdio.h>
#include "linktest.h"


int main(int argc, const char *argv[])
{
	int choosenum;
	int posnum;
	Linknode *H=creat();
	while(1)
	{
		printf("*	*	*	*	*	*	*	*	*\n");
		printf("	1.hinsert	2.tinsert	3.pinsert\n");
		printf("	4.hdelete	5.tdelete	6.pdelete\n");
		printf("	7.areturn	8.sortlin	9.view	 \n");
		printf("*	*	*	*	*	*	*	*	*\n");
		printf("plz choose\n");
		printf(">>>");
		scanf("%d",&choosenum);
		switch(choosenum)
		{
		case 1:
			Hinsert(H);
			break;
		case 2:
			Tinsert(H);
			break;
		case 3:
			printf("plz input posnum\n");
			scanf("%d",&posnum);
			posinsert(H,posnum);
			break;
		case 4:
			Hdelete(H);
			break;
		case 5:
			Tdelete(H);
			break;
		case 6:
			printf("plz input posnum\n");
			scanf("%d",&posnum);
			posdelete(H,posnum);
			break;
		case 7:
			returnlink(H);
			break;
		case 8:
			sortlink(H);
			break;
		case 9:
			view(H);
			break;
		default:
			break;
		}
	}

	return 0;
}
